/* weehttpd
* Copyright (c) 2008 Jeffery Myers
*
* This package is free software;  you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/


#ifndef _TIME_UTILS_H_
#define _TIME_UTILS_H_

#include <string>
#include <vector>

typedef struct {
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int dayofweek;
  bool daylightSavings;
} WeeTime;

void getLocalTime ( WeeTime &ts );
void getUTCTime ( WeeTime &ts );

std::string printTime ( WeeTime &ts, const char* timezone = "UTC" );
void appendTime ( std::string & text, WeeTime &ts, const char* timezone = "UTC" );

double getTimerSeconds( void );

#endif //_TIME_UTILS_H_


// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
// c-basic-offset: 2 ***
// indent-tabs-mode: t ***
// End: ***
// ex: shiftwidth=2 tabstop=8
